package com.ceba.test.webservice.service;

import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;

import com.ceba.test.base.web.response.WebServiceResponseInfo;
@Path(value="/rs")
@SOAPBinding(style = Style.DOCUMENT)
@WebService(targetNamespace = "http://com.ceba.test.webservice.service")
public interface RestService {


	/**
	 * 提交签名的ID和转换成base64格式的需要签名的文件
	 * created by dingf
	 * @return
	 */
	@POST
	@Path("/uploadBase64FileAndSignByID")
	@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
	@Produces(MediaType.APPLICATION_JSON)
	public String uploadBase64FileAndSignByID(@WebParam(name="params")String params);

	/**
	 * 提交签名ID和需要签名文件(的路径)
	 * created by dingf
	 * @return
	 */
	@POST
	@Path("/uploadFileAndSignFromFormByID")
	@Consumes({"text/plain","multipart/form-data"})
	@Produces(MediaType.APPLICATION_JSON)
	public String uploadFileAndSignFromFormByID(@Multipart(value="json",type=MediaType.TEXT_PLAIN)String json,
												@Multipart(value="pdf",type=MediaType.APPLICATION_OCTET_STREAM) Attachment pdf);

	/**
	 * 表单提交，JSON格式，多签名
	 * @return
	 */
	@POST
	@Path("/uploadFileAndMultiSignFromFormByID")
	@Consumes({"text/plain","multipart/form-data"})
	@Produces(MediaType.APPLICATION_JSON)
	public String uploadFileAndMultiSignFromFormByID(@Multipart(value="json",type=MediaType.TEXT_PLAIN)String json,
													 @Multipart(value="pdf",type=MediaType.APPLICATION_OCTET_STREAM) Attachment pdf);


}
